#include "ThreadPool.hpp"
#include "udp_server.hpp"
#include "Route.hpp"
#include <memory>
int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        LOG(INFO, "Usage: <./exe><port>\n");
        return -1;
    }
    uint16_t port = atoi(argv[1]);
    Route ro;
    // 业务todo
    std::unique_ptr<UdpServer> server = std::make_unique<UdpServer>(port,
                                                                    std::bind(&Route::RouteHandler,
                                                                    &ro,
                                                                    std::placeholders::_1,
                                                                    std::placeholders::_2,
                                                                    std::placeholders::_3)
                                                                    );
    server->Start();
    server->Close();
    return 0;
}